package com.ljh.onlinetest.service;

import com.github.pagehelper.PageInfo;
import com.ljh.onlinetest.domain.ExamPaper;
import com.ljh.onlinetest.domain.User;
import com.ljh.onlinetest.viewmodel.admin.paper.PaperEditRequestVM;
import com.ljh.onlinetest.viewmodel.admin.paper.PaperPageRequestVM;
import com.ljh.onlinetest.viewmodel.student.dashboard.PaperFilter;
import com.ljh.onlinetest.viewmodel.student.dashboard.PaperInfo;
import com.ljh.onlinetest.viewmodel.student.exam.ExamPaperPageVM;

import java.util.List;

/**
 * @author ljh
 * @ClassName ExamPaperService.java
 * @createTime 2022年01月18日
 */
public interface ExamPaperService extends BaseService<ExamPaper>{
    PageInfo<ExamPaper> listPage(PaperPageRequestVM pageRequestVM);

    PaperEditRequestVM examPaperToVM(Integer id);

    /**
     * 将examPaper转化成前端的试卷信息model
     * @param examPaper
     * @return
     */
    PaperEditRequestVM examPaperToVM(ExamPaper examPaper);

    ExamPaper savePaperFromVM(PaperEditRequestVM model, User currentUser);

    PageInfo<ExamPaper> taskExamPage(PaperPageRequestVM pageRequestVM);

    Integer selectAllCount();

    List<PaperInfo> indexPaper(PaperFilter fixPaperFilter);

    PageInfo<ExamPaper> studentPage(ExamPaperPageVM model);
}
